package com.iatinspur;

/**
 * java -Xbootclasspath/a:C:/Users/huangjian01/Desktop/jvm-learn-1.0.jar -classpath C:/Users/huangjian01/Desktop/class-loader-test-1.0.jar com.iatinspur.Loaderclass a
 *
 * -Xbootclasspath/a:C:/Users/huangjian01/Desktop/jvm-learn-1.0.jar 添加这个包
 * -classpath C:/Users/huangjian01/Desktop/class-loader-test-1.0.jar com.iatinspur.Loaderclass a  执行class-loader-test-1.0.jar包中com.iatinspur.Loaderclass类得main方法 args 是 ["a"]
 *
 *
 */
public class Loaderclass {
    /**
     *  BootstrapClassLoader               主加载器
     *  sun.misc.Launcher$AppClassLoader  应用加载器
     *  sun.misc.Launcher$ExtClassLoader  拓展加载器 主管ext目录下得jar包
     */
    public static void main(String[] args) {
        try {
            Class<?> aClass = Class.forName("com.iatinspur.classloader.Test");
            System.out.println(aClass.getClassLoader());
        } catch (ClassNotFoundException e) {
            throw new RuntimeException(e);
        }
    }
}
